import { Component, Input, OnInit } from '@angular/core';
import { CommentDataProvider } from '../../providers/comment-data/comment-data';

/**
 * Generated class for the CommentListComponent component.
 *
 * See https://angular.io/api/core/Component for more info on Angular
 * Components.
 */
@Component({
  selector: 'comment-list',
  templateUrl: 'comment-list.html'
})
export class CommentListComponent implements OnInit {

  @Input()parkObjectId:string;
  comments:any[];
  

  constructor(public commentDataProvider:CommentDataProvider) {
   
  }
  ngOnInit():void{
    this.commentDataProvider.getCommentByParkId(this.parkObjectId).subscribe(data=>this.comments=data);
  }

}
